package com.suse.lhw.hms.authserver.service.impl;

import com.suse.lhw.hms.authserver.service.URoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.suse.lhw.hms.authserver.domin.URole;
import com.suse.lhw.hms.authserver.mapper.URoleMapper;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ProjectName: health_manage_system
 * @Package: com.suse.lhw.hms.authserver.service
 * @ClassName: URoleServiceImpl
 * @Description: java类作用描述
 * @Author: 李鸿炜
 * @CreateDate: 2020/3/28 17:54
 * @UpdateUser: 更新者
 * @UpdateDate: 2020/3/28 17:54
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
@Service
public class URoleServiceImpl implements URoleService {

    @Resource
    private URoleMapper uRoleMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return uRoleMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(URole record) {
        return uRoleMapper.insert(record);
    }

    @Override
    public int insertSelective(URole record) {
        return uRoleMapper.insertSelective(record);
    }

    @Override
    public URole selectByPrimaryKey(Integer id) {
        return uRoleMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(URole record) {
        return uRoleMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(URole record) {
        return uRoleMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<URole> seleallRolesByUserId(String id) {
        return uRoleMapper.selectAllRoleByUserId(id);
    }
}
